import Vue from "vue";
import VueRoute from "vue-router";

Vue.use(VueRoute);

const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login"),
  },
  {
    path: "/",
    name: "layout",
    redirect:'/my',
    component: () => import("@/views/layout"),
    children: [
      {
        path: "home",
        component: () => import("@/views/Home"),
      },
      {
        path: "video",
        component: () => import("@/views/Home/index01.vue"),
      },
      {
        path: "answer",
        component: () => import("@/views/Answer"),
      },
      {
        path: "my",
        component: () => import("@/views/My"),
      },
    ],
  },
  {
    path:'/detail/:id',
    component:()=>import('@/views/art_detail')
  },
  {
    path:'/setchannel',
    component:()=>import('@/views/SetChannel')
  },
  {
    path:'*',
    component:()=>import('@/views/noFind')
  }
];

export default new VueRoute({
  routes,
});
